Debian 6.0
Sponsored Link

Configure NIS Client
2011/03/08
  Configure NIS clients

[1] Install NIS
root@www:~#
aptitude -y install nis portmap


Preconfiguring packages ...

# input domain name


[2] Configure as a NIS Client
root@www:~#
vi /etc/yp.conf


#
# yp.conf
Configuration file for the ypbind process. You can define

#
NIS servers manually here if they can't be found by

#
broadcasting on the local net (which is the default).

#
#
See the manual page of ypbind for the syntax of this file.

#
# IMPORTANT:
For the "ypserver", use IP addresses, or make sure that

#
the host is in /etc/hosts. This file is only interpreted

#
once, and if DNS isn't reachable yet the ypserver cannot

#
be resolved and ypbind won't ever bind to the server.


# ypserver ypserver.network.com
# add at the last: (domain name) (server) (NIS server's hostname)

domain srv.world server dlp.srv.world


root@www:~#
vi /etc/nsswitch.conf


passwd:
compat
nis
# line 7: add

group:
compat
nis
# add

shadow:
compat
nis
# add


hosts:
files dns
nis
# add


# set follows if needed

root@www:~#
vi /etc/pam.d/common-session


# add at the last: create home directory automatically at the first login

session optional pam_mkhomedir.so skel=/etc/skel umask=077


root@www:~#

www login:
debian
# user on NIS

Password:
Last login: Tue Mar 8 20:11:34 JST 2011 on ttyS0
Linux www 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Creating directory '/home/debian'.
debian@www:~$
# just logined

debian@www:~$
10.0.0.30
debian@www:~$
ypcat passwd

squeeze:x:1000:1000:squeeze,,,:/home/squeeze:/bin/bash
fedora:x:1001:1001:fedora,,,:/home/fedora:/bin/bash
debian:x:1002:1002:debian,,,:/home/debian:/bin/bash
debian@www:~$
ypcat hosts

10.0.0.100
dlp.srv.world dlp

10.0.0.100
dlp.srv.world dlp

127.0.0.1
localhost

debian@www:~$
# change NIS password

Changing NIS account information for debian on dlp.
Please enter old password:
Changing NIS password for debian on dlp.
Please enter new password:
Please retype new password:

The NIS password has been changed on dlp.
debian@www:~$
# complete to change
 
Tweet